﻿using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Commons.ASPNETCore
{

    public record PageRequest(int PageIndex, int PageSize);
    public class PageRequesttValidator : AbstractValidator<PageRequest>
    {
        public PageRequesttValidator()
        {
            RuleFor(e => e.PageIndex).NotNull().LessThanOrEqualTo(999);
            RuleFor(e => e.PageSize).NotNull().LessThanOrEqualTo(999);
        }
    }
}
